/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.afcepf.projet2.metiers.donnees.entites.commandes;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 *
 * @author sylva_000
 */
@Entity(name = "EtatCommande")
@NamedQueries({
    @NamedQuery(name = "EtatCommande.findAll", query = "SELECT e FROM EtatCommande e")})
public class EtatCommande implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "idEtatCommande")
    private Long idEtatCommande;
    @Column(length = 15, nullable = false, unique = true,
    name = "EtatCommande")
    private String etatCommande;

    public Long getIdEtatCommande() {
        return idEtatCommande;
    }

    public String getEtatCommande() {
        return etatCommande;
    }

    public void setIdEtatCommande(Long idEtatCommande) {
        this.idEtatCommande = idEtatCommande;
    }

    public void setEtatCommande(String etatCommande) {
        this.etatCommande = etatCommande;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEtatCommande != null ? idEtatCommande.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EtatCommande)) {
            return false;
        }
        EtatCommande other = (EtatCommande) object;
        if ((this.idEtatCommande == null && other.idEtatCommande != null) || (this.idEtatCommande != null && !this.idEtatCommande.equals(other.idEtatCommande))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.afcepf.projet2.entities.commandes.EtatCommande[ id=" + idEtatCommande + " ]";
    }
}
